package com.cryann.mqttserver.config;

import com.cryann.mqttserver.modle.AccessorStore;
import com.cryann.mqttserver.modle.MqttMessageStore;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: cRyann
 * @date: 2019/10/22 9:00
 * @description: 单例Bean注入配置
 **/
@Configuration
public class SingleBean {

    @Bean
    public AccessorStore getAccessorStore(){
        return AccessorStore.instance();
    }

    @Bean
    public MqttMessageStore getMqttMessageStore(){
        return MqttMessageStore.instance();
    }
}
